package com.whenjun.task;

import com.whenjun.common.LoggerParent;
import com.whenjun.service.core.DoorService;
import com.whenjun.service.impl.IscPersonServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@EnableScheduling
public class DoorPerson extends LoggerParent {

    @Autowired
    private DoorService doorService;

    // 每 60 分钟执行一次
    @Scheduled(cron = "0 0 0/1 * * ?")
    public void syncDoor(){
        doorService.syncDoor();
    }
}
